package mn10;

public class OrderEvent {
    private String userId;
    private long timestamp;
    private boolean isOrder; // true for order, false for cancellation

    public OrderEvent() {
    }

    public OrderEvent(String userId, long timestamp, boolean isOrder) {
        this.userId = userId;
        this.timestamp = timestamp;
        this.isOrder = isOrder;
    }

    // Getters and setters
    public String getUserId() { return userId; }
    public long getTimestamp() { return timestamp; }
    public boolean isOrder() { return isOrder; }

    public void setUserId(String userId) { this.userId = userId; }
    public void setTimestamp(long timestamp) { this.timestamp = timestamp; }
    public void setOrder(boolean isOrder) { this.isOrder = isOrder; }


    @Override
    public String toString() {
        return "OrderEvent{" +
                "userId='" + userId + '\'' +
                ", timestamp=" + timestamp +
                ", isOrder=" + isOrder +
                '}';
    }
}